<?php
/**
 * User: aka
 * Time: 18:47
 */

namespace app\secret\model;

use think\Model;

class Users extends Model
{
    public function scopeAccount($query, $account)
    {
        $query->where('account', '=', $account);
    }

    public function scopeUserInfo($query, $userId)
    {
        $query->where('id', '=', $userId)->field('name');
    }
}